var tablename1 = "friends";
var tablename2 = "chat";
var app = this;
var $ = require("../../include/$");
module.exports = {
	post: function(req, res) {
		var data = req.body;
		req.models[tablename1].create($.extend({}, data.friends), function(err, result_ship) {
			if (err) {
				res.send(500, err);
			}else{
				req.models[tablename2].create($.extend({},data.chat),function(err,result_chat){
					
				})
			};
		})
	}
}